<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Docs For Class MySQLCodec</title>
  <link rel="stylesheet" href="../media/stylesheet.css" />
  <script src="../media/lib/classTree.js"></script>
<link id="webfx-tab-style-sheet" type="text/css" rel="stylesheet" href="../media/lib/tab.webfx.css" />
<script type="text/javascript" src="../media/lib/tabpane.js"></script>
  <script language="javascript" type="text/javascript" src="../media/lib/ua.js"></script>
<script language="javascript" type="text/javascript">
	var imgPlus = new Image();
	var imgMinus = new Image();
	imgPlus.src = "../media/images/plus.gif";
	imgMinus.src = "../media/images/minus.gif";
	
	function showNode(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
				var oImg = document.layers["img" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
				var oImg = document.all["img" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
				var oImg = document.getElementById("img" + Node);
        		break;
        }
		oImg.src = imgMinus.src;
		oTable.style.display = "block";
	}
	
	function hideNode(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
				var oImg = document.layers["img" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
				var oImg = document.all["img" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
				var oImg = document.getElementById("img" + Node);
        		break;
        }
		oImg.src = imgPlus.src;
		oTable.style.display = "none";
	}
	
	function nodeIsVisible(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
        		break;
        }
		return (oTable && oTable.style.display == "block");
	}
	
	function toggleNodeVisibility(Node){
		if (nodeIsVisible(Node)){
			hideNode(Node);
		}else{
			showNode(Node);
		}
	}
</script>
<!-- template designed by Julien Damon based on PHPEdit's generated templates, and tweaked by Greg Beaver -->
<body bgcolor="#ffffff" ><!-- Start of Class Data -->
<h2>
	Class MySQLCodec
</h2> (line <span class="linenumber">31</span>)
<div class="tab-pane" id="tabPane1">
<script type="text/javascript">
tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ));
</script>

<div class="tab-page" id="Description">
<h2 class="tab">Description</h2>
<pre>
<a href="../ESAPI/Codec.html">Codec</a>
   |
   --MySQLCodec</pre>
<p>
	<b><i>Located in File: <a href="_codecs---MySQLCodec.php.html">/codecs/MySQLCodec.php</a></i></b><br>
</p>
<!-- ========== Info from phpDoc block ========= -->
<h5>Implementation of the Codec interface for MySQL strings. See http://mirror.yandex.ru/mirrors/ftp.mysql.com/doc/refman/5.0/en/string-syntax.html  for more information.</h5>
<ul>
		<li><strong>author:</strong> - Arnaud Labenne - dotsafe.fr</li>
		<li><strong>version:</strong> - 1.0</li>
		<li><strong>copyright:</strong> - 2009-2010 The OWASP Foundation</li>
		<li><strong>see:</strong> - org.owasp.esapi.Encoder</li>
		<li><strong>since:</strong> - 1.4</li>
	</ul>
<br /><hr />
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "Description" ) );</script>
<div class="tab-page" id="tabPage1">

<h2 class="tab">Class Variables</h2>
<!-- ============ VARIABLE DETAIL =========== -->
<strong>Summary:</strong><br />
<hr />
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage1" ) );</script>
</div>
<div class="tab-page" id="constantsTabpage">

<h2 class="tab">Class Constants</h2>
<!-- ============ VARIABLE DETAIL =========== -->
<strong>Summary:</strong><br />
<div class="const-title">
    <a href="#constMYSQL_ANSI" title="details" class="property"><strong>MYSQL_ANSI</strong></a>
</div>
<div class="const-title">
    <a href="#constMYSQL_STD" title="details" class="property"><strong>MYSQL_STD</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_0" title="details" class="property"><strong>ORD_VALUE_0</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_B" title="details" class="property"><strong>ORD_VALUE_B</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_BSLASH" title="details" class="property"><strong>ORD_VALUE_BSLASH</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_DQUOTE" title="details" class="property"><strong>ORD_VALUE_DQUOTE</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_N" title="details" class="property"><strong>ORD_VALUE_N</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_PERCENT" title="details" class="property"><strong>ORD_VALUE_PERCENT</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_QUOTE" title="details" class="property"><strong>ORD_VALUE_QUOTE</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_R" title="details" class="property"><strong>ORD_VALUE_R</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_T" title="details" class="property"><strong>ORD_VALUE_T</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_UNDERSCORE" title="details" class="property"><strong>ORD_VALUE_UNDERSCORE</strong></a>
</div>
<div class="const-title">
    <a href="#constORD_VALUE_Z" title="details" class="property"><strong>ORD_VALUE_Z</strong></a>
</div>
<hr />
<a name="constMYSQL_ANSI" id="constMYSQL_ANSI"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">MYSQL_ANSI =  0</strong> (line <span class="linenumber">33</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constMYSQL_STD" id="constMYSQL_STD"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">MYSQL_STD =  1</strong> (line <span class="linenumber">34</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_0" id="constORD_VALUE_0"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_0 =  48</strong> (line <span class="linenumber">37</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_B" id="constORD_VALUE_B"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_B =  98</strong> (line <span class="linenumber">38</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_BSLASH" id="constORD_VALUE_BSLASH"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_BSLASH =  92</strong> (line <span class="linenumber">46</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_DQUOTE" id="constORD_VALUE_DQUOTE"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_DQUOTE =  34</strong> (line <span class="linenumber">43</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_N" id="constORD_VALUE_N"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_N =  110</strong> (line <span class="linenumber">40</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_PERCENT" id="constORD_VALUE_PERCENT"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_PERCENT =  37</strong> (line <span class="linenumber">44</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_QUOTE" id="constORD_VALUE_QUOTE"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_QUOTE =  39</strong> (line <span class="linenumber">45</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_R" id="constORD_VALUE_R"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_R =  114</strong> (line <span class="linenumber">41</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_T" id="constORD_VALUE_T"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_T =  116</strong> (line <span class="linenumber">39</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_UNDERSCORE" id="constORD_VALUE_UNDERSCORE"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_UNDERSCORE =  95</strong> (line <span class="linenumber">47</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<a name="constORD_VALUE_Z" id="constORD_VALUE_Z"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/Constant.gif" border="0" /> <strong class="property">ORD_VALUE_Z =  90</strong> (line <span class="linenumber">42</span>)
 </h4>
<!-- ========== Info from phpDoc block ========= -->
<ul>
	</ul>
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "constantsTabpage" ) );</script>
</div>
<div class="tab-page" id="tabPage2">
<h2 class="tab">Method Detail</h2>
<!-- ============ METHOD DETAIL =========== -->
<strong>Summary:</strong><br />
<div class="method-summary">
    <div class="method-definition">
            <span class="method-result">void</span>
        <a href="#methoddecodeCharacter" title="details" class="method-name">decodeCharacter</a>
        (<span class="var-type"></span>&nbsp;<span class="var-name">$input</span>)
        </div>
    <div class="method-definition">
            <span class="method-result">void</span>
        <a href="#methodencodeCharacter" title="details" class="method-name">encodeCharacter</a>
        (<span class="var-type"></span>&nbsp;<span class="var-name">$immune</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$c</span>)
        </div>
    <div class="method-definition">
            <span class="method-result">MySQLCodec</span>
        <a href="#method__construct" title="details" class="method-name">__construct</a>
        ([<span class="var-type">mode</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">self::MYSQL_STD</span>])
        </div>
</div>
<hr />
<A NAME='method_detail'></A>


<a name="methoddecodeCharacter" id="methoddecodeCharacter"><!-- --></a>
<div style="background='#ffffff'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Method decodeCharacter</strong> (line <span class="linenumber">194</span>)
 </h4> 
<h4><i>void</i> <strong>decodeCharacter(

$input)</strong></h4>

<p><strong>Overrides :</strong> <a href="../ESAPI/Codec.html#methoddecodeCharacter">Codec::decodeCharacter()</a> Returns the decoded version of the next character from the input string and advances the  current character in the PushbackString.  If the current character is not encoded, this  method MUST reset the PushbackString.</p>
	<!-- ========== Info from phpDoc block ========= -->
<h5>{@inheritDoc}</h5>
<div class="desc"><p>Returns the decoded version of the character starting at index, or  null if no decoding is possible.</p><p>In ANSI_MODE '' decodes to '    In MYSQL_MODE \x decodes to x (or a small list of specials)</p></div>
		<h4>Parameters</h4>
	<ul>
			<li><strong> $input</strong>: </li>
		</ul>
		
	<h4>Info</h4>
	<ul>
			<li><strong>access</strong> - public</li>
		</ul>
</div>
<a name="methodencodeCharacter" id="methodencodeCharacter"><!-- --></a>
<div style="background='#eeeeee'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Method encodeCharacter</strong> (line <span class="linenumber">66</span>)
 </h4> 
<h4><i>void</i> <strong>encodeCharacter(

$immune, 
$c)</strong></h4>

<p><strong>Overrides :</strong> <a href="../ESAPI/Codec.html#methodencodeCharacter">Codec::encodeCharacter()</a> Encode a Character with a Codec.</p>
	<!-- ========== Info from phpDoc block ========= -->
<h5>{@inheritDoc}</h5>
		<h4>Parameters</h4>
	<ul>
			<li><strong> $immune</strong>: </li>
			<li><strong> $c</strong>: </li>
		</ul>
		
	<h4>Info</h4>
	<ul>
			<li><strong>access</strong> - public</li>
		</ul>
</div>
<a name="method__construct" id="method__construct"><!-- --></a>
<div style="background='#ffffff'"><h4>
<img src="../media/images/Constructor.gif" border="0" /> <strong class="method">Constructor __construct</strong> (line <span class="linenumber">57</span>)
 </h4> 
<h4><i>MySQLCodec</i> <strong>__construct(
[mode
$mode = self::MYSQL_STD])</strong></h4>

<p><strong>Overrides :</strong> <a href="../ESAPI/Codec.html#method__construct">Codec::__construct()</a> Populates the $hex map of non-alphanumeric single-byte characters.</p>
	<!-- ========== Info from phpDoc block ========= -->
<h5>Public Constructor</h5>
		<h4>Parameters</h4>
	<ul>
			<li><strong>mode $mode</strong>: Mode has to be one of {MYSQL_MODE|ANSI_MODE} to allow correct encoding</li>
		</ul>
		
	<h4>Info</h4>
	<ul>
		</ul>
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage2" ) );</script></div>
<div class="tab-page" id="iVars">
<h2 class="tab">Inherited Variables</h2>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "iVars" ) );</script>
<!-- =========== VAR INHERITED SUMMARY =========== -->
<A NAME='var_inherited_summary'><!-- --></A>
<h3>Inherited Class Variable Summary</h3>

	</div>
<div class="tab-page" id="iMethods">
<h2 class="tab">Inherited Methods</h2>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "iMethods" ) );</script>
<!-- =========== INHERITED METHOD SUMMARY =========== -->
<A NAME='functions_inherited'><!-- --></A>
<h3>Inherited Method Summary</h3>

		<!-- =========== Summary =========== -->
	<h4>Inherited From Class <a href="../ESAPI/Codec.html">Codec</a></h4>
				<h4>
<img src="../media/images/Constructor.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#method__construct">Codec::__construct()</a></strong> - Populates the $hex map of non-alphanumeric single-byte characters.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodcontainsCharacter">Codec::containsCharacter()</a></strong> - Utility to search a char[] for a specific char.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methoddecode">Codec::decode()</a></strong> - Decode a String that was encoded using the encode method in this Class
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methoddecodeCharacter">Codec::decodeCharacter()</a></strong> - Returns the decoded version of the next character from the input string and advances the  current character in the PushbackString.  If the current character is not encoded, this  method MUST reset the PushbackString.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methoddetectEncoding">Codec::detectEncoding()</a></strong> - Utility to detect a (potentially multibyte) string's encoding with extra logic to deal with single characters that mb_detect_encoding() fails upon.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodencode">Codec::encode()</a></strong> - Encode a String with a Codec.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodencodeCharacter">Codec::encodeCharacter()</a></strong> - Encode a Character with a Codec.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodforceToSingleCharacter">Codec::forceToSingleCharacter()</a></strong> - Utility to get first (potentially multibyte) character from a (potentially multicharacter) multibyte string.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodgetHexForNonAlphanumeric">Codec::getHexForNonAlphanumeric()</a></strong> - Returns the ordinal value as a hex string of any character that is not a  single-byte alphanumeric. The character should be supplied as a string in  the UTF-32 character encoding.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodisHexDigit">Codec::isHexDigit()</a></strong> - *  Utility method to determine if a single character string is a hex digit
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodnormalizeEncoding">Codec::normalizeEncoding()</a></strong> - Utility to normalize a string's encoding to UTF-32.
		</h4> 

				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../ESAPI/Codec.html#methodtoHex">Codec::toHex()</a></strong> - Return the hex value of a character as a string without leading zeroes.
		</h4> 

				<br />
	</div>
</div>
<script type="text/javascript">
//<![CDATA[

setupAllTabs();

//]]>
</script>
	<div id="credit">
		<hr />
		Documentation generated on Fri, 16 Apr 2010 14:30:33 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</div>
</body>
</html>